package com.analog.vserver.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;
import com.analog.vserver.domain.file.QueueMinioEntity;
import com.analog.vserver.service.VideoService;


@Component
public class UploadVideoReceive {

	@Autowired
	private VideoService videoService;
	
	
    @RabbitListener(queues="uploadvideo")    //监听器监听指定的Queue
    public void processC(String str) {
    	QueueMinioEntity qme = JSON.toJavaObject(JSON.parseObject(str), QueueMinioEntity.class);
        videoService.processVideo(qme);
    }
}
